﻿namespace WebQuestionnaire.Core
{
    using System;
    using NHibernate.Validator.Constraints;
    using SharpArch.Core;
    using SharpArch.Core.DomainModel;
    using System.Runtime.Serialization;
    using System.Collections.Generic;

    public class Questionnaire : EntityWithTypedId<Guid>
    {

        [DomainSignature]
        [NotNullNotEmpty(Message = "Meno dostazníka nesmie byť prázdne")]
        public virtual string Title { set; get; }
        
        public virtual bool Enabled { set; get; }
        
        [Past]
        public virtual DateTime? AvailableFrom { set; get; }

        public virtual DateTime? AvailableTo { set; get; }

        [NotNull]
        public virtual int? QuestionnaireType { set; get; }

        [NotNullNotEmpty(Message = "Musí byt definovaný administrátor")]
        public virtual string Administrator { set; get; }

        public virtual bool IsAnonymous { set; get; }

        public virtual bool IsSecured { set; get; }

        public virtual string CountDown { set; get; }

        public virtual IList<Permission> Permissions { set; get; }

        public virtual IList<Image> Images { set; get; }

        public virtual IList<Element> Elements { set; get; }
    }
}